<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>

<h:body>
	<ui:composition template="/WEB-INF/templates/homeTemplate.xhtml">

		<ui:define name="content">
			<h4>#{msg.listPatientsPageHeader}</h4>

			<h:form>
				<h:dataTable value="#{pte.getAllPatients()}" var="pat" 
				styleClass="table-full"
				headerClass="table-header"
				columnClasses="oddColumn,evenColumn"
				rowClasses="table-odd-row,table-even-row">
					<f:facet name="caption">Patients</f:facet>
					<h:column>
						<f:facet name="header">Patient Id</f:facet>
						#{pat.patientId}
					</h:column>
					<h:column>
						<f:facet name="header">First Name</f:facet>
						#{pat.firstName}
					</h:column>
					<h:column>
						<f:facet name="header">Last Name</f:facet>
						#{pat.lastName}
					</h:column>
					<h:column>
						<f:facet name="header">Age</f:facet>
						#{pat.age}
					</h:column>
					<h:column>
						<f:facet name="header">Gender</f:facet>
						#{pat.gender}
					</h:column>
					<h:column>
						<f:facet name="header">Contact Details</f:facet>
						#{pat.contact.mobileNumber}
						#{pat.contact.building}
						#{pat.contact.street}
						#{pat.contact.pincode}
					</h:column>
				</h:dataTable>
			</h:form>
		</ui:define>

	</ui:composition>
</h:body>

</html>